<template>
  <div id="app">
    <van-nav-bar
      :title="$route.meta.title"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
      fixed
    />

    <router-view class="router-view" />
    <div class="tabbar-placeholder"></div>

    <tabbar></tabbar>
  </div>
</template>
<script>
import tabbar from "./components/tabbar.vue";

export default {
  name: "app",
  components: { tabbar },
  data() {
    return {
      active: 0,
    };
  },
  methods: {
    onClickLeft() {
      if (
        this.$route.path == "/user" ||
        this.$route.path == "/home" ||
        this.$route.path == "/category" ||
        this.$route.path == "/shopcaty"
      ) {
        return 0;
      }
      this.$router.go(-1);
    },
  },
};
</script>

<style>
@import "./assets/css/base.css";
.router-view {
  padding-top: 46px;
  height: 100%;
  overflow: hidden;
  padding-bottom: 50px;
}
</style>
